# --------------------------------------------------
# -*- coding: utf-8 -*-
# Time: 2023/2/21 15:04  
# Author: 沈凌鹏
# Version: 0.1
# File: enemy_fight.py
# Description: 管理敌人的信息输入与战斗
# --------------------------------------------------
from FightGame.role import hero


# 管理敌人信息以及与敌人战斗
class EnemyFight():

    # 实例化timo战斗与输入信息进行战斗
    def timo_fight(self, hp, power, speed):

        # 实例化英雄
        timo = hero.Timo(hp, power, speed)

        print("请输入敌人的属性：")
        enemy_hp = float(input("请输入体力:"))
        enemy_power = float(input("请输入力量:"))
        enemy_speed = float(input("请输入速度:"))

        # 进行战斗
        timo.fight(enemy_hp, enemy_power, enemy_speed)

    # 实例化timo战斗与输入信息进行战斗
    def jinx_hero(self, hp, power, speed, defences):

        # 实例化英雄
        jinx = hero.Jinx(hp, power, speed, defences)

        print("请输入敌人的属性：")
        enemy_hp = float(input("请输入体力:"))
        enemy_power = float(input("请输入力量:"))
        enemy_speed = float(input("请输入速度:"))
        enemy_defences = float(input("请输入防御:"))

        # 进行战斗
        jinx.fight(enemy_hp, enemy_power, enemy_speed, enemy_defences)
